diff --git a/main.go b/main.go
index 9eb479f756c360fddf6fcfc891c0e283cafd0264..671fa1b063f51ecf1a6d4e4cce266ec1a517f576 100644
--- a/main.go
+++ b/main.go
@@ -7,12 +7,8 @@ import (
 	"io/ioutil"
 	"log"
 	"net/http"
-	"os"
 	"strconv"
 	"sync"
-
-	_ "github.com/lib/pq"
-	"golang.org/x/crypto/bcrypt"
 )
 
 /******************** DATA STRUCTS ***********************/
@@ -55,20 +51,6 @@ func main() {
 	// Initialise global variables
 	gameData = make(map[int]*Game)
 
-	connStr := "user=btt password='" + os.Getenv("BTT_PASSWORD") + "' dbname=bigtactoe sslmode=require"
-	database, err := sql.Open("postgres", connStr)
-	if err != nil {
-		log.Fatal("could not connect to database")
-	}
-	defer database.Close()
-
-	// statement, _ := database.Prepare("CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, username TEXT UNIQUE, password TEXT, wins INTEGER, losses INTEGER, draws INTEGER)")
-	// statement.Exec()
-
-	// // test query
-	// database.QueryRow("INSERT INTO users(username, password, wins) VALUES($1, $2, $3);",
-	// 	"user123", "qwerty", 0)
-
 	http.HandleFunc("/", hello)
 
 	// Game processing endpoints
@@ -77,12 +59,7 @@ func main() {
 	http.HandleFunc("/join", joinGame)
 	http.HandleFunc("/wait", checkJoinGame)
 
-	// User authentication endpoints
-	http.HandleFunc("/create-account", createUser)
-	http.HandleFunc("/login", login)
-	http.HandleFunc("/leaderboard", leaderboard)
-
-	err = http.ListenAndServe(":8080", nil)
+	err := http.ListenAndServe(":8080", nil)
 	if err != nil {
 		log.Println("could not start server")
 	}
@@ -221,126 +198,6 @@ func checkJoinGame(w http.ResponseWriter, r *http.Request) {
 	fmt.Fprintf(w, p2) // send player2's name
 }
 
-// /************** User authentication and other ****************/
-func createUser(w http.ResponseWriter, r *http.Request) {
-	jsonData := readJsonFromRequest(r)
-
-	var account struct {
-		Username string `json:"username"`
-		Password string `json:"password"`
-	}
-	err := json.Unmarshal(jsonData, &account)
-	if err != nil {
-		fmt.Fprintf(w, "could not decode json data")
-		return
-	}
-
-	// response will be an error message and success boolean
-	response, ok := newAccount(account.Username, account.Password)
-	if !ok {
-		fmt.Fprintf(w, response)
-	} else {
-		fmt.Fprintf(w, account.Username) // if success, return the username
-	}
-}
-
-func login(w http.ResponseWriter, r *http.Request) {
-	jsonData := readJsonFromRequest(r)
-
-	var account struct {
-		Username string `json:"username"`
-		Password string `json:"password"`
-	}
-	err := json.Unmarshal(jsonData, &account)
-	if err != nil {
-		fmt.Fprintf(w, "could not decode json data")
-		return
-	}
-
-	// response will be the new user's ID if successful, otherwise, will be other message
-	authenticated := authenticate(account.Username, account.Password)
-	if authenticated {
-		fmt.Fprintf(w, "logged in")
-	} else {
-		fmt.Fprintf(w, "wrong password")
-	}
-}
-
-// returns a map[username]wins as json
-func leaderboard(w http.ResponseWriter, r *http.Request) {
-	usernames, ok := getLeaderboard()
-	if !ok {
-		fmt.Fprintf(w, "Could not get leaderboard")
-		return
-	}
-
-	jsonString, err := json.Marshal(usernames)
-	if err != nil {
-		fmt.Fprintf(w, "could not marshal leaderboard usernames into json")
-		return
-	}
-
-	w.Header().Set("Content-Type", "application/json")
-	w.WriteHeader(http.StatusCreated)
-	w.Write(jsonString)
-}
-
-/************** Database operations ****************/
-
-// Inserts new account into users table, returns true or false success and message
-func newAccount(username string, password string) (string, bool) {
-	hashedPassword, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
-	if err != nil {
-		return "Internal server error occurred while hashing your password.", false
-	}
-	var userID string
-	err = database.QueryRow("INSERT INTO users(username, password, wins) VALUES($1, $2, $3) RETURNING id;",
-		username, hashedPassword, 0).Scan(&userID)
-	if err != nil {
-		return "That username has been taken", false
-	}
-
-	return "", true
-}
-
-// Authenticates a user, used to login. Returns true if successful
-func authenticate(username string, password string) bool {
-	var hashed []byte
-	database.QueryRow("SELECT password FROM users WHERE username=$1;",
-		username).Scan(&hashed)
-
-	err := bcrypt.CompareHashAndPassword(hashed, []byte(password))
-	if err != nil {
-		return false
-	}
-	return true
-}
-
-func getLeaderboard() (map[string]int, bool) {
-	rows, err := database.Query("SELECT username, wins FROM users;")
-	if err != nil {
-		return nil, false
-	}
-	var usernames map[string]int
-	for rows.Next() {
-		var username string
-		var wins int64
-		rows.Scan(&username, &wins)
-		usernames[username] = int(wins)
-	}
-	return usernames, true
-}
-
-func incrementWins(username string) (int, bool) {
-	var wins int
-	err := database.QueryRow("UPDATE users SET wins=wins+1 WHERE username=$1 RETURNING wins;",
-		username).Scan(&wins)
-	if err != nil {
-		return -1, false
-	}
-	return wins, true
-}
-
 /************** Helper functions *******************/
 
 func generateID() int {