added user registration photo logic