login function should access the database, locate users, and update the website if they are logged in