Changed isLoggedIn to static method.