added very basic error handling to register, if either of or all fields are left empty then it simply redirects them back to the register in page