fix test
fix authorization
remove where clauses which are causing problems with postgresql

instead use find_all_by_...