added user_id column in photos table, added user has many photos relationship, moved all tested functions into allfunctions