added the login functionality