added login and lgoogout logic