Added JSON api for registration and checking if and can move.