Successfully registering logs you and gives success message while errors throw alerts