Fixed some php issues with password reset