huge login restructure, also ignores case