Added Registration code, fixed ui.