added devise functionality