Refactoring of router + added register form