fixing the login and register to do proper ID stuff