Changes in definition of CheckPresence directive and LoginService scripts