Add localStorage support to User model