Redirect to sign_up page if the user is not logged in

I'm seeing an issue that if the user goes to /account/edit without logged in, it's not redirecting him to sign_up path, it's rendering a blank page