Added session/login system

Use the latest sql.