added logout and back button. back button not functioning properly doe