Improved devise functionality