changed checkAuth() to model->checkAuth()