working on login functionality