Pass database objects from authentication decorator to querres.
Remove double slashes in urls.
Fix errors in permisions tests.
Fix typo(permittions) in url names.