added javascript to check for users on login