wrote login system for ui