Update register.js

Go to the login page after register so the user can login and all proper variables are set.