move the functions so that it won't be call when it is not needed. trim the username to fix the bug when we have our dummy user with leading or trailing space in its username.
move the functions so that it won't be call when it is not needed. trim the username to fix the bug when we have our dummy user with leading or trailing space in its username.

orionhealth/XBDD,orionhealth/XBDD,orionhealth/XBDD,orionhealth/XBDD,orionhealth/XBDD