Some login reworking