add mysql support and simple login function