Refactoring : Refactor tests and class of User and Session.