Completed the login functionality.