If you will use this method:
After saving save successfully
session = UserSession.find session.destroy if session
You are likely to lose your administrator session, which may add a user.
Thus, the best way would be to simply add some parameters to your user.rb model:
acts_as_authentic do |c| c.maintain_sessions = false
Now it should work.
source share