added devise and and also added better error messages for the users