Fixes #1439, logging in from a public discussion will redirect you back

Fixes #1439.
New to rails/rspec, so I wasn't sure where to add a test. Advice welcomed.

Not too sure on the feature either, not entirely sure how they work.