Fix website login when username contains spaces (#3573)