Separated out register page and added backend logic