<s> from django . contrib . auth . forms import AuthenticationForm <EOL> from django . contrib . auth import login <EOL> class AuthenticationResourceForm ( AuthenticationForm ) : <EOL> def __init__ ( self , ** kwargs ) : <EOL> self . instance = kwargs . pop ( '<STR_LIT>' , None ) <EOL> super ( AuthenticationResourceForm , self ) . __init__ ( ** kwargs ) <EOL> def check_for_test_cookie ( self ) : <EOL> return <EOL> def save ( self , commit = True ) : <EOL> assert self . request <EOL> user = self . get_user ( ) <EOL> login ( self . request , user ) <EOL> return user </s>
