Unit tests for authentication