ログインバナーにユーザー名を表示

You are right … thanks for the warning … was getting this on console when logged out:

null is not an object (evaluating 'api.getCurrentUser().name')

Fixed my code above, clearing the error when logged out. Apologies, believe the original script worked fine.