Fixed login_required redirect issue