Added the login functionality