added devise control flow to controllers.