CAS-1260: Trimming the username on set 

to avoid the dangling space added by certain mobile clients.