Fixed register. Added auth check.