Fixed behaviour when no servers are available
Authenticate apiclient when saved local user
Small code changes