unit tests for authenticate_user service