fix null pointer on login