Logins with port numbers not including ports on redirect/login
Check if anything in this list of typical things might help:


Check if you get the same problem using another browser. If with another browser it works, then it might be a cookie problem. To solve that, delete the cookie in the browser where you have the problem.
Make sure "clean urls" is enabled. Refer to "Clean URL leads to duplicate URL after migration to another hosting" for more details on that.
Make sure the value of "base_url" is set correctly in your settings.php (for D7) and settings.php (for D6).