added login_required
fixed login_required