Added authorization aspect.
Fixed all other aspects.