ticket:1 added saving and restoring user data from database