Added logged in functions and python file that caters ajax request