Added more tests and implemented logout.
Modified startup