more error handling
params and session can now be set on the controller