added unit tests for user authorization