Created auth middleware and prepared package model