logging in client api