Getting NPEs in attemptLogin