refactored authenticaion tests