Serialize database to file.
Check if username is taken before creating user.