modified redirect, formatting and added user email permissions