Added ability to logout, plus ui test.