Implemented the login system which now redirects the user to his or her homepage