Add tests for registration and authentication