refactored controller and templates to use the new session flashbag introduced in symfony 2.1