Added multi user type support and logout.