You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: login.go
    path of file: ./repos/Hamster/internal/app/controller
    
    the code of the file until where you have to start completion: // Copyright 2018 Clivern. All rights reserved.
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE file.

package controller

import (
	"github.com/clivern/hamster/interna
    
func Login(c *gin.Context) {

	githubOauth := &github.OAuthApp{
		ClientID:     os.Getenv("GithubAppClientID"),
		RedirectURI:  os.Getenv("GithubAppRedirectURI"),
		AllowSignup:  os.Getenv("GithubAppAllowSignup"),
		Scope:        os.Getenv("GithubAppScope"),
		ClientSecret: os.Getenv("GithubAppClientSecret"),
	}

	state, err := c.Cookie("gh_oauth_state")

	if err != nil || state == "" {
		githubOauth.GenerateState()
		c.SetCookie("gh_oauth_state", githubOauth.GetState(), 3600, "/", os.Getenv("AppDomain"), true, true)
	} else {
		githubOauth.SetState(state)
	}

	c.HTML(http.StatusOK, "login.tmpl", gin.H{
		"title":    "Hamster",
		"oauthURL": githubOauth.BuildAuthorizeURL(),
	})
}