Fixed small bugs and added logout button