def signup_form(): #WORKS
    """
    In GET request
        - Displays sign up page.
    """
    if request.method == 'GET':
        if 'user' in session:
            return redirect(url_for('start'))
        signup_error = request.args.get('s_error', False)
        signup_page = ((requests.get(url='http://127.0.0.1:8080/html/{}'.format('signup.html'))).content).decode("utf-8") # Done
        return render_template_string(signup_page, signupError = signup_error)
    """
    In POST request
        - Gets data from form.
        - Checks if username is not already present.
        - Adds to database if not present.
        - Redirects to dashboard.
    """
    if request.method == 'POST':
        username = (request.form['username']).lower().strip()
        password = (request.form['password'])
        is_valid_username = ((requests.get(url='http://127.0.0.1:8080/is-valid-username/{}'.format(username))).content).decode("utf-8") # Done
        if is_valid_username == "False":
            requests.post(url='http://127.0.0.1:8080/add-user', data={'username' : username, 'password' : password}) # Done
            session['user'] = username
            return redirect(url_for("start"))
        else:
            return redirect(url_for("signup_form", s_error = True))