Security upgrade for devise