Registration script
Updated Links

added create account link
Comments and bug fixes

Redirect to login page on failure
Comments for easy understanding