Added new methods in BaseController, filled unit testing and tweaked session a little bit.