Refactoring.
Added: authentication.