Working version with new devise version