Looks like the problem is the redirect that google does back to our server after a successful login. It gets confused if the ports doesn't match.