Revert "Revert "new troubles in auth login""

This reverts commit 18bbe35e8c4548bd4821d7fe2175bd99ed696580.