Rehashed login-sm to use callback table

- also initialize PCRE