Patch Set 5:

- rebased to current master
- fixed minor style nits and fixed formatting according to project rules

LGTM

I wonder if we should flush the secure store when the credentials have been put in order to prevent loss of credentials in case Eclipse crashes later.