added devise helper for errors