Added dispatch function and login_required to views that need them.