added admin_required decorator and check_admin() to base.py