User Logged in check using plain Javascript