Separated auth window.
Code cleanup.