Fixing some PHP warnings in login