Added devise functionality