Added getGlobal() function
Added validateToken() function