Formatting changes and point the request to the correct server.

Also this fixes the issue with not being able to log in. The formatting changes made to the foreach loop caused the msg to not be generated correctly.