Removed spurious $. Created a more meaningful response for auth errors while registering the client.