base login system with server response validation