added model relationships.
Simplified Authorization and fixed an error.
removed user_ids from models.