Fixed an issue where if the user tried to access a page they did not
have permission to while logged in it brought up the log in page.  Also
fixed an issue where the displayName was not spelt correctly in the
email template for new accounts.