improvements for login_required