Registration Revision v2

PHP fix + login fix