added login functionalities