Added unit tests for authentication.