implement api client in user class for login