Fix layout, add tests
Finish user authentication