Splitted the thread from Login and Logout using Sessions and Cookies