fixed validation of nil username
fixed adding empty user