SYNR-545

Added two extra cases to the login method to deal with local caching of the API key.