Log in updated

- reg visible by status
- started refactoring
- still to do: check for duplicate login