make staic getter a bit more flexible wrt input objects
Fix problem where username was not properly set under mgd2
make usernames "url-safe"
Fix username query for mgd2 and add test