added code to send user object to profile.php