p much finished (relatively) basic auth stuff