Big refactoring. Used symfony2 http foundation component. Session storage in database.