Fix login
Add tests for locations