Adapting login for authentication with portal