Added logging in functionality (along with confimation email)