Refactoring
Added simple autorization

..and refactoring