Created functionality for Register Button (haven't tested yet)