Changed path info to request URI
We have to use $uri instead of $request_uri to ensure that all rewrites are passed to PHP
There are other places we need this info, move it to entity
Updated to use new global configuration
Removed obsolete avatar name column