Refactor 3 1

Made the register button safer.