I had tested the custom portal and that didnt work either. But stangely enough today I was able to login using Safari. I havent changed anything in the portal.
It was quite bizare as I was able to login in to any portal in chrome, explorerer and firefox but with the same url, username and password when logging into Safari at the same time I was not able too. I was getting the error I mentioned in the first post. Sometimes I wonder if I have gremlins in my computer.
Ill keep checking its working fine.