finally online and offline presence is working properly. need to test this behaviour under high load for reasons being it may be faulty becoz of mutex locks