got session token from server, having var scope issues

NOTE: took away jquery