Fixing login function - use mysqli