Saving and loading authorization to/from database.