Added set_auth method to model and controller