finished basic functionality of registering a user and authenticating a token