Added devise
Better state management