Prevent NPE in login with null username/pw