Implemented logout button, changed some handling of user id