Fixed a very silly bug which was causing error in user registration. Updated and cleaned current code