integration test for authentication and authorization