For the HTML5 client, if a user have trailing whitespace after the username, the login will fail. In the native clients we strip trailing whitespace from the username and server input fields. We should do this for the username field in the login form for the HTML5 client as well.
I started with verifying the problem on ThinLinc 4.6.0 and I can confirm that both leading and trailing whitespace in the username will make the authentication fail. Verified with a nightly build that I can still log in: - when a username is entered with a trailing space or tab - when a username is entered with a leading space or tab