added a view count to every homework and some authorization