Create a new business space and create a version for testing there. Then try to login in the testing mode. If this works, then either you forgot the right credentials or you have corrupt testing database for the main business space. In either case you can export your business space version and import it into the new business space.
If login in the new business space doesn't work then indeed you have some issue with ports. In this case please attach output of Tomcat and the Aware IM Server.