Implemented SP logout