Define basecontroller prototype functions.