Settings finished.
Little refactoring.
Preparations for moving to SQLite
Merge branch 'djachenko'

* djachenko:
  Preparations for moving to SQLite
  Little refactoring.
  Settings finished.
Merge branch 'master' into ershov

* master:
  Preparations for moving to SQLite
  Little refactoring.
  Settings finished.
Login layout fix