Bugfix for an NPE when trying to log in