Just a suggestion, you could `redirect_to home_path and return if logged_in?` This was a signed in user will be redirected when they try to access this path. The `and return` will make sure `@user` is not set in such a situation.