MOB-2142 if-else notation changed, modifiers changed, username assigned only on login success