PHP API updates. registration, login

Login doesn't work yet.