Fixed a bug where the port number was being added after login