#21 Fixed access to admin's pages

Fixed access to admin's pages.
Added test.