Fixed auth bug

Login key wasn't getting saved, because this was being accessed inside a callback