Replace generate_token to work with devise >= 3.0.0