tests for authenticate