Cleaned up code
SO MUCH SECURE
Gave the user a cookie
Moved a few lines