Implemented logout screen and function