completed registering process, login needs work

fixed register process (was going invalid base64 encoding from device).
login still needs work as the callback inst working.