Fixed issue with imports.
Shiro: fixed potential NPE.
REST: improved logging.