jsmestad/sinatra_warden — pull request #11 by francois (2012-03-05 15:10:03+00:00)
Title: Don't lose session[:return_to] when invalid credentials are submitted

The scenario is the following:

1. Start unauthenticated
2. Visit a random page (/dashboard)
3. Browser is redirected to /login
4. Submit invalid credentials (typo, whatever)
5. /login rendered again
6. Submit correct credentials
7. Browser redirected to /unauthenticated

The test as written expresses my intent, but *DOES NOT* fail, thus this
pull request is to understand what I'm doing wrong. The change in
`sinatra.rb` was verified to work with my app.