/login_form view does login without the redirect back to the original page. In addition, the /logout action logs the user out. The logic that drives the login process .