added devise and corrected flash notification