partly done
authentication and registration with server