Added authorization and modified model