Refactored gui code and added textbox to insert the session id