added user login functionality