Initial engine coped from spree_auth_devise