def start(): #WORKS
    """
    - The starting page.
    - Redirects to login page if not logged in.
    - Redirects to dashboard if logged in.
    """
    logged_in = False
    if 'user' in session:
        logged_in = True
        is_admin = (requests.get(url='http://127.0.0.1:8080/is-admin/{}'.format(session['user'])).content).decode("utf-8") # Done
        if is_admin == "True":
            return redirect(url_for('dashboard'))
    most_viewed_video_IDs = ((requests.get('http://127.0.0.1:8080/get-most-viewed')).content).decode("utf-8") # Done
    most_viewed = {}
    most_viewed_video_IDs = ast.literal_eval(most_viewed_video_IDs)
    for ID in most_viewed_video_IDs:
        title = ((requests.get(url='http://127.0.0.1:8080/title/{}'.format(ID))).content).decode("utf-8") # Done
        views = ((requests.get(url='http://127.0.0.1:8080/views/{}'.format(ID))).content).decode("utf-8") # Done
        uploader = ((requests.get(url='http://127.0.0.1:8080/uploader/{}'.format(ID))).content).decode("utf-8") # Done
        details = [title, views, uploader]
        most_viewed.update({ID : details})
    homepage = ((requests.get(url='http://127.0.0.1:8080/html/{}'.format('homepage.html'))).content).decode("utf-8") # Done
    return render_template_string(homepage, logged_in = logged_in, most_viewed = most_viewed)