implenting registration and tidying up UI