fixed one line error and other errors for signup and login forms

Very similar to the getFormData function in signup_form. Consider making a helper function instead.