implemented user's login functionality