Polymorphic comment model with field for anonymous commenters. Mailboxer gem added with mailboxer migrations. Store last URL in session and redirect after login/update.