Very bad practice of php code, please fix this little list and re-upload
:
Check user input (so something like username a-zA-Z 0-9 and only 10 chars long, you need limits.
Please do not rely on javascript redirection, if you do, set a php die; after the script.
If you want a more interactive login, use AJAX it will look fancy