Simplify code, use class router for api1 routes.
If user is not authenticated, raise unauthorized.
Fix errors in legislation templates.
Fix legislation tests.
Fix jshint errors.
Drop database before tests.