Adding logic to login method so that api_login password can be set