fix some redirects, added require_login