added @login_required to all functions in views