In the registration form, add AJAX or the post variable in each input textbox, so if the registration fails, the user doesn't have to keep re-entering the data.
AJAX would be better, imo. But whatever.
EDIT: Somethings you may want to work on.
It looks like you just ripped that login system from PHP Academy and called it your own, but that's beyond the point.
Call forms by using
PHP Code:
if(isset($_POST['submit'])){}
And put all of the functions inside of that. Don't use mysql_num_rows, or whatever the hell you did.
Also,
ALWAYS use mysql_real_escape_string(); for all variables that are going in/out of your database. Mostly in, but just to be safe, do both.
Everything seems okay, besides the login script, and the fact that you're not cleaning variables.