checked devise, added flash message