Modified to pass user details around