Fixed restricting accounts in some situations
Merge pull request #994 from jpeg729/sort

Sort app list
Save open tab
Merge branch 'master' into sort