Optimize the ui and add a logout part;