Implement encryption into DbStorage

* also some refactoring
* fix the correct oauth token