Refactored RegisterViewController.
Clear username and password fields after login so that after logging out, the fields are empty.