updated for auto login after reg