changed the login method from using the base url to using a endpoint.