I was recently troubleshooting a custom wordpress login form that worked on the localhost server but not on the WP Engine hosting.
This login form was not created via a plugin, but just through a custom shortcode that replicated the login form on a custom login page for front-end users.
When I tried to login to this form on the WP Engine hosting environment, after clicking login, I immediately got a 502 error. I combed the error logs but it didn’t turn anything up.
After chatting with WP Engine Support, I was informed that when you implement a custom login page like this you need to ask Support to request that login protection is turned off.