pageinit funtion not responding to console.log