Fix exception on login