SDN + login fix

Fixes sdn + login, cleaned up a bunch of unused imports and fixed some warnings aswell.