Login and Register managament added

Fixed problems revealed during pull request discussion.