Restrict access to logged users
fix tests
Refactor tests
Code cleanup
Merge branch 'access_restriction'