Added session token check to getuser function