changed the testing of user auth to ng-click function