login finished and SQL