Arguments
next: A function to run on success.
Effect
This method is called automatically by the controller before performing the requested action. It can be used to initialize anything needed, check that the user is authenticated, etc. Importantly, on success the developer must call the next() function passed in as an argument to continue execution. If you would like to divert the user down another path (because they failed authentication, for example) you could redirect them to the login page instead.