Implements different buttons for open and closed tabs, and makes session...

...s open when submitting them.