Trim usernames before authenticating

Since the ios-sdk doesn't handle username with (trailing) spaces gracefully we can as well strip the username string before authenticating.
Trying to authenticate a username with a trailing space will result in a general error message instead of the expected "unknown username or password".