Added support for reading curent user and logging in or out