Changes to authentication flow. Now we should be able to use the api with no issues.