Another approach to resolve error of getting logged off - not working