fixing up user sessions spec and fixed register shutdown function issue