Hot bug fixing

— Merged login and registration factories.
— Added login checking for new user registration.
— Added catching of some exceptions.