routes definition moved up because it used by dashboard function
fix order of declaration
Merge pull request #1 from AlexeyFrolov/master

routes definition moved up because it used by dashboard function