Adjusted username parameter in returnHistory functions

Passed parameter in, experimented with ajax code to try and get it to
work.