fixed registration

Hi! Thank you for your code! I tried to use it to research laravel framework, but the registration didn't work. The form was sending data to the same action, as login. I made some fixes.