update database.yml
update the sessions controller to fix loop redirect