You can use the javascript webpart and output the information in a script block using a macro. Your macro would be something like:
<script type="text\javascript">
var currUserID = {%MembershipContext.AuthenticatedUser.UserID|(identity)GlobalAdministrator%}
object to a js variable if it will keep the object structure or not but worth a try I guess.