Creating actual model of auth file.

Moving logic to query and update auth file into a separate model object.