create user model class
create UserTable class to save new registration to the database
use UserTable to save new registrations to the database by modifying RegisterController class
authenticating the login form using the Zend\Authentication component
add logout action to LoginController
migrate existing code blocks to make use of ServiceManager
make necessary changes to the controllers to fetch the instances of RegisterForm, LoginForm, UserTable classes from ServiceManager
obtain authentication service from ServiceManager