added authorization to users and edit pages