API fix for login.