Use explicit toBool() when checking user authentication status. Removed unnecessary code.