Implemented logout and login features when app is not running.