Added support for username in principal