add register feature, refactor session class