refactored sqlhandler, activation link work