more implementation for login