Added some code to ascertain the username from the url