add functionality for login and logout of a user

Change-Id: I92b4a0803454684b42e17b4417129bd3c9ec3e12