Fix for issue #22

Null pointer exception when setting username.