added a basecontroller for basic controller functions such as before filtering and what not.