Added login functionality with MySQL backend