Finished Login and Register process with data validity check