updated post method and re-populated register form with input data