Registration and login fix