Fixed a runtime error by adding platform checking condition

"Uncaught TypeError: Cannot read property 'isLoggedIn' of undefined"
error has been fixed.