Ok, please don't merge this yet. I found an error in the logs. It seems like there is some problem in the code which starts the authentication process again. It looks like this happened because the reference to the variable 'account' got updated in the meantime. I'll look into this tomorrow.
2014/10/20 16:02:38 Poll for account 2 has failed: Token expired
2014/10/20 16:02:38 Ending poll for account 2
2014/10/20 16:02:38 Poll for account 3 has failed: Token expired
2014/10/20 16:02:38 Ending poll for account 3
2014/10/20 16:02:40 New account data for existing account with id 2
2014/10/20 16:02:40 Starting poll for account 2
2014/10/20 16:02:40 Polling account 2
2014/10/20 16:02:41 Account 2 has 0 updates to report
2014/10/20 16:02:41 Poll for account 2 was successful
2014/10/20 16:02:41 Ending poll for account 2
2014/10/20 16:02:47 Creating account with id 2 for com.ubuntu.developer.webapps.webapp-gmail_webapp-gmail
2014/10/20 16:02:47 gmail plugin 2: last state loaded from storage
2014/10/20 16:02:47 Starting poll for account 2
2014/10/20 16:02:47 Polling account 2
2014/10/20 16:02:48 Account 2 has 0 updates to report
2014/10/20 16:02:48 Poll for account 2 was successful
2014/10/20 16:02:48 Ending poll for account 2
2014/10/20 16:03:08 Creating account with id 2 for com.ubuntu.developer.webapps.webapp-gmail_webapp-gmail
2014/10/20 16:03:08 gmail plugin 2: last state loaded from storage
2014/10/20 16:03:08 Starting poll for account 2
2014/10/20 16:03:08 Polling account 2
2014/10/20 16:03:09 Account 2 has 0 updates to report
2014/10/20 16:03:09 Poll for account 2 was successful
2014/10/20 16:03:09 Ending poll for account 2
Ok, please don't merge this yet. I found an error in the logs. It seems like there is some problem in the code which starts the authentication process again. It looks like this happened because the reference to the variable 'account' got updated in the meantime. I'll look into this tomorrow.
2014/10/20 16:02:38 Poll for account 2 has failed: Token expired developer. webapps. webapp- gmail_webapp- gmail developer. webapps. webapp- gmail_webapp- gmail
2014/10/20 16:02:38 Ending poll for account 2
2014/10/20 16:02:38 Poll for account 3 has failed: Token expired
2014/10/20 16:02:38 Ending poll for account 3
2014/10/20 16:02:40 New account data for existing account with id 2
2014/10/20 16:02:40 Starting poll for account 2
2014/10/20 16:02:40 Polling account 2
2014/10/20 16:02:41 Account 2 has 0 updates to report
2014/10/20 16:02:41 Poll for account 2 was successful
2014/10/20 16:02:41 Ending poll for account 2
2014/10/20 16:02:47 Creating account with id 2 for com.ubuntu.
2014/10/20 16:02:47 gmail plugin 2: last state loaded from storage
2014/10/20 16:02:47 Starting poll for account 2
2014/10/20 16:02:47 Polling account 2
2014/10/20 16:02:48 Account 2 has 0 updates to report
2014/10/20 16:02:48 Poll for account 2 was successful
2014/10/20 16:02:48 Ending poll for account 2
2014/10/20 16:03:08 Creating account with id 2 for com.ubuntu.
2014/10/20 16:03:08 gmail plugin 2: last state loaded from storage
2014/10/20 16:03:08 Starting poll for account 2
2014/10/20 16:03:08 Polling account 2
2014/10/20 16:03:09 Account 2 has 0 updates to report
2014/10/20 16:03:09 Poll for account 2 was successful
2014/10/20 16:03:09 Ending poll for account 2