Josh's php fixes

fixes login